package com.team2.insulatingtools.modular.system.entity;

import cn.stylefeng.roses.kernel.rule.tree.factory.base.AbstractTreeNode;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.List;

/**
 * @author yangqian
 * @date 2023-04-10 10:06
 * @description
 **/
@Data
public class SimpleOrgTreeNode implements AbstractTreeNode<SimpleOrgTreeNode> {


    private Long value;

    private String title;
    @JsonIgnore
    private Long id ;
    @JsonIgnore
    private Long parentId;
    @JsonIgnore
    private String nodeId;
    @JsonIgnore
    private String nodeParentId;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<SimpleOrgTreeNode> children;

    @Override
    public String getNodeId() {
        return this.value.toString();
    }

    @Override
    public String getNodeParentId() {
        return this.parentId.toString();
    }

    @Override
    public void setChildrenNodes(List childrenNodes) {
        this.setChildren(childrenNodes);
    }

}
